package com.shujia.day13;

import java.io.File;

public class Code09File {
    public static void main(String[] args) {
        /*
            public boolean isDirectory()
            public boolean isFile()
            public boolean exists()
            public boolean canRead()
            public boolean canWrite()
            public boolean isHidden()  // 判断文件是否是隐藏文件
         */

        File file1 = new File("data/a");
        File file2 = new File("data/a.txt");

        System.out.println(file1.isDirectory());
        System.out.println(file2.isFile());

        File file = new File("data/s");
        System.out.println(file.exists());


        File file3 = new File("data/b.txt");
        System.out.println(file3.canRead());
        System.out.println(file3.canWrite());


        boolean hidden = file3.isHidden();
        System.out.println(hidden);

    }
}
